package com.ksd.modules.area.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ksd.common.core.result.R;
import com.ksd.modules.area.entity.MayaCity;
import com.ksd.modules.area.mapper.MayaCityMapper;
import com.ksd.modules.area.service.IMayaCityService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Auto Generator
 * @since 2023-10-12
 */
@Service
public class MayaCityService extends ServiceImpl<MayaCityMapper, MayaCity> implements IMayaCityService {

    @Override
    public R<List<MayaCity>> searchByParentId(String parentId) {
        LambdaQueryWrapper<MayaCity> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(MayaCity::getParentId,parentId);
        return R.success(baseMapper.selectList(queryWrapper));
    }
}
